<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title>${title}</title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<#include "common/am.reference.ftl" />
	</head>
	<body class="${configs["skinName"]}">
		<div class="page-content">
			<div class="row">
			<#if viewMode !="view">
			<#include "common/breadcrumb.ftl">
			</#if>
				<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}">
					<div class="col-xs-12">
						<div class="widget-box">
							<div class="widget-body">
								<input type="hidden" name="id" id="id" value="${model.id}" <#if viewMode == "view">disabled</#if>>
								<#if viewMode == "view">
								<div class="widget-header widget-header-flat">
									<h5 class="lighter">
										${module}
									</h5>
								</div>
								<#else>
								<div class="alert alert-warning">
									<strong>提示!</strong>
									<strong style="color:#dd514c;">出现红框</strong>的表示不能为空
								</div>
								</#if>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        公司标识
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="CompanyId" name="CompanyId" value="${model.companyId}" class="form-control" required placeholder="如:522301HDCX" <#if viewMode == "edit"||viewMode == "view">disabled</#if>>
                                        <span class="lbl">公司标识 部统一分配</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        公司名称
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="OwnerName" name="OwnerName" value="${model.getOwnerName()}" class="form-control" required placeholder="请输入公司名称">
                                        <span class="lbl"></span>
                                    </div>
                                </div>
                                <!--
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        许可地行政区划代码
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="Address" name="Address" value="${model.getAddress()}" class="form-control" required placeholder="请输入许可地行政区划代码">
                                        <span class="lbl">许可地行政区划代码 见GB/T 2260</span>
                                    </div>
                                </div>-->
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        许可地行政区划代码
                                    </label>
                                    <div class="col-sm-6">
                                        <select id="Address" name="Address" class="chosen-select form-control" required data-placeholder="请选择许可地行政区划代码" <#if viewMode == "view">disabled</#if>>
                                            <#if areaList?exists && areaList?size gt 0>
                                            <#list areaList as item>
                                            <option value="${item.areaCode}"<#if model.address == item.areaCode>selected</#if> >${item.areaName}</option>
                                            </#list>
                                            </#if>
                                        </select>
                                        <input type="hidden" name="areaName" value="${model.areaName}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        经营区域
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="operationArea" name="operationArea" value="${model.operationArea}" class="form-control" required placeholder="请输入经营区域" >
                                        <span class="lbl"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        网络预约出租汽车经营许可证号
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="Certificate" name="Certificate" value="${model.getCertificate()}" class="form-control" required placeholder="请输入网络预约出租汽车经营许可证号">
                                        <span class="lbl"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        发证机构名称
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="Organization" name="Organization" value="${model.getOrganization()}" class="form-control" required placeholder="请输入发证机构名称">
                                        <span class="lbl"></span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        有效期起
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="StartDate" name="StartDate" value="${model.getStartDate()}" class="form-control" required placeholder="请输入有效期起">
                                        <span class="lbl">有效期起 YYYYMMDD</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        有效期止
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="StopDate" name="StopDate" value="${model.getStopDate()}" class="form-control" required placeholder="请输入有效期止">
                                        <span class="lbl">有效期止 YYYYMMDD</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        初次发证日期
                                    </label>
                                    <div class="col-sm-6">
                                        <input type="text" id="CertifyDate" name="CertifyDate" value="${model.getCertifyDate()}" class="form-control" required placeholder="请输入初次发证日期">
                                        <span class="lbl">初次发证日期 YYYYMMDD</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        是否启用
                                    </label>
                                    <div class="col-sm-6">
                                        <input class="ace ace-switch ace-switch-7" type="checkbox" name="enabled" <#if model == null || model.enabled>checked="checked"</#if> <#if viewMode == "view">disabled</#if>>
                                        <span class="lbl"></span>
                                    </div>
                                </div>
								<#if viewMode != "view">
								<div class="clearfix form-actions">
									<div class="col-md-offset-3 col-md-9">
										<button id="btnSubmit" class="btn btn-info" type="submit">
											<i class="fa fa-check bigger-110"></i>
											提 交
										</button>
									</div>
								</div>
								</#if>
							</div>
						</div>
					</div>
				</form>
			</div>	
		</div>
		<script type="text/javascript">
		$(function(){
		    $('#Address').chosen();
            $('#Address').change(function(){
                var address = $(this).val();
                var operationArea = $(this).find('option[value="'+address+'"]').text();
                $('input[name="operationArea"]').val(operationArea);
            });
            $('#operationArea').trigger('change');

			$('.select-chosen').chosen();
			$('#form').validator();
		})
		</script>
	</body>
</html>